import NotFound from "@/components/not-found"; // 页面引入方法一
import layout from "@/components/layout";

export default [
  {
    path: "/",
    component: layout,
    redirect: "/home", // 重定向第一种写法
    //  redirect: { name: 'home' }, // 重定向第二种写法：路由对象的name
    children: [
      {
        path: "home",
        name: "home",
        meta: { title: "主页" },
        component: () => import("@/views/home/home.vue"),
      },
    ],
  },
  // 访问不到页面时
  { path: "/:pathMatch(.*)*", name: "NotFound", component: NotFound },
];
